package com.ks.app.admin.hibernate;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.ks.app.product.hibernate.KRoom;

/**
 * KsUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "K_MERCHANTREGIST")
public class KsMerchantRegist implements java.io.Serializable {
	
	private static final long serialVersionUID = 8615093245971250679L;

	// Fields
	private long ksMerRegistId;//商家表主键ID
	private String merName;//商家名称
	private String ksPwd;//密码 
	private String ksMerStatus;//状态  1：删除 2：冻结3：推荐
	private String remark;//备注
	private String ksMerNo;//编号
	private String ksMerGroup;//用户组
	private String ksSpechielIdentify;//特别屏蔽权限
	private Date ksCreateTime;//创建时间
	private String ksFullName;//商家全称
	private String ksMerAddress;//商家地址
	private String ksMerPhone;//商家电话
	private String ksMerEmail;//商家email
	private String ksMerBusinessTime;//营业时间
	private String ksMerArea;//所在区域
	
	private List<KRoom> merRoom = new ArrayList<KRoom>();//关联房间
	private KMerBaseSet merBaseSetID;//关联基本设置
	private KsMerAuthen merauthen;//关联认证
	
	@Id
	@GeneratedValue
	public long getKsMerRegistId() {
		return ksMerRegistId;
	}
	public void setKsMerRegistId(long ksMerRegistId) {
		this.ksMerRegistId = ksMerRegistId;
	}
	public String getMerName() {
		return merName;
	}
	public void setMerName(String merName) {
		this.merName = merName;
	}
	public String getKsPwd() {
		return ksPwd;
	}
	public void setKsPwd(String ksPwd) {
		this.ksPwd = ksPwd;
	}
	public String getKsMerStatus() {
		return ksMerStatus;
	}
	public void setKsMerStatus(String ksMerStatus) {
		this.ksMerStatus = ksMerStatus;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getKsMerNo() {
		return ksMerNo;
	}
	public void setKsMerNo(String ksMerNo) {
		this.ksMerNo = ksMerNo;
	}
	public String getKsMerGroup() {
		return ksMerGroup;
	}
	public void setKsMerGroup(String ksMerGroup) {
		this.ksMerGroup = ksMerGroup;
	}
	public String getKsSpechielIdentify() {
		return ksSpechielIdentify;
	}
	public void setKsSpechielIdentify(String ksSpechielIdentify) {
		this.ksSpechielIdentify = ksSpechielIdentify;
	}
	public Date getKsCreateTime() {
		return ksCreateTime;
	}
	public void setKsCreateTime(Date ksCreateTime) {
		this.ksCreateTime = ksCreateTime;
	}
	public String getKsFullName() {
		return ksFullName;
	}
	public void setKsFullName(String ksFullName) {
		this.ksFullName = ksFullName;
	}
	public String getKsMerAddress() {
		return ksMerAddress;
	}
	public void setKsMerAddress(String ksMerAddress) {
		this.ksMerAddress = ksMerAddress;
	}
	public String getKsMerPhone() {
		return ksMerPhone;
	}
	public void setKsMerPhone(String ksMerPhone) {
		this.ksMerPhone = ksMerPhone;
	}
	public String getKsMerEmail() {
		return ksMerEmail;
	}
	public void setKsMerEmail(String ksMerEmail) {
		this.ksMerEmail = ksMerEmail;
	}
	public String getKsMerBusinessTime() {
		return ksMerBusinessTime;
	}
	public void setKsMerBusinessTime(String ksMerBusinessTime) {
		this.ksMerBusinessTime = ksMerBusinessTime;
	}
	public String getKsMerArea() {
		return ksMerArea;
	}
	public void setKsMerArea(String ksMerArea) {
		this.ksMerArea = ksMerArea;
	}
	//此处外键设置KRoom表，并且KRoom为多，如果实现查询此表也能查出KRoom表的话需要设置fetch
	@OneToMany(mappedBy="merRoom",fetch=FetchType.EAGER,cascade=CascadeType.ALL)
	public List<KRoom> getMerRoom() {
		return merRoom;
	}
	public void setMerRoom(List<KRoom> merRoom) {
		this.merRoom = merRoom;
	}
	//此处外键设置在此表
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="merauthen")
	public KsMerAuthen getMerauthen() {
		return merauthen;
	}
	//此处外键设置在此表
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="merBaseSetID")
	public KMerBaseSet getMerBaseSetID() {
		return merBaseSetID;
	}
	public void setMerBaseSetID(KMerBaseSet merBaseSetID) {
		this.merBaseSetID = merBaseSetID;
	}
	public void setMerauthen(KsMerAuthen merauthen) {
		this.merauthen = merauthen;
	}
	

	
}